const webpack = require('webpack');

module.exports = {
    //基本路径
    //baseUrl: './',
    publicPath: './',
    //构建临时输出路径
    outputDir: "dist",
    //静态资源路径
    assetsDir: 'static',
    //默认html路径
    indexPath: "index.html",
    //文件名Hash
    filenameHashing: true,
    //保存时是否使用"eslint-loader"检查
    lintOnSave: true,
    //是否使用带有浏览器内编译器的完整构建版本
    runtimeCompiler:true,
    productionSourceMap: false,
    // devServer: {
    //     proxy: {
    //         '/api':{
    //             target:'http://jsonplaceholder.typicode.com',
    //             changeOrigin:true,
    //             pathRewrite:{
    //                 '/api':''
    //             }
    //         }
    //     }
    // }
    devServer: {
        port: 80,
        proxy: {
            '/api': {
                target: 'http://127.0.0.1:8088',
                changeOrigin: true,
                pathRewrite: {
                    '/api': ''
                }
            }
        }
    },
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                $:"jquery",
                jQuery:"jquery",
                "windows.jQuery":"jquery"
            })
        ]
    }
}